<?php 
define('__ROOT__', dirname(dirname(__FILE__))); 
include_once(__ROOT__.'../../includes/header.php');
include_once(__ROOT__.'../../includes/leftnav.php');
 ?>
<div class="span7">
<ul class="breadcrumb">
	<li>
		<a href="<?php echo base_url('/home'); ?>">Home</a> <span class="divider">/</span>
	</li>
	<li>
		<a href="<?php echo base_url('/admin/dashboard'); ?>">Dashboard</a><span class="divider">/</span>
	</li>
	<li>Post Article</li>
</ul>
<div id="content" class="span10">
<h4>Post an useful article in Maykha Portal.</h4>
<?php 
echo validation_errors();
if (isset($message))
	echo '<span class="error">' . $message . '</span>';
$attributes = array('class' => 'form-horizontal' , 'id' => 'articlefrm');
echo form_open_multipart($action, $attributes);?>
	<fieldset>
			<div class="row-fluid">
				<select id="catg" name="catg" data-rel="chosen">
						<?php
						foreach ($categories as $key => $value) {
							echo '<option value="' . $key . '">';
							echo $value;
							echo '</option>';
						}
						?>
				</select>
			</div>
			<div class="row-fluid">
				<div class="span9">
					<label>Title<span class="error">*</span></label> <input type="text" class="span12"
						placeholder="Enter your advertisement's title here" name="articletitle" id="articletitle" value="<?php echo set_value('articletitle'); ?>">
				</div>
				<!--/span-->
			</div>
			<!--row-->
			<div class="row-fluid">
				<div class="span9">
					<label>Summary<textarea id="articlesummary" name="articlesummary" rows="5" class="input-xxlarge"><?php echo set_value('articlesummary'); ?>
					</textarea>
					</label>
				</div>
			</div>
			<!--row-->
			<div class="row-fluid">
				<div class="span9" id="articleDesc">
					<label>Entry<span class="error">*</span>
					<textarea class="comments cleditor" id="entry" name="entry" rows="3">
							<?php echo set_value('entry'); ?>
					</textarea>
					</label>
				</div>
			</div>
			<br>
			<!--/row-->
			<div class="row-fluid">
				<div class="span12">
					<label>Add Images</label> <input data-no-uniform="true"
						type="file" name="userfile[]" id="file_upload" multiple="multiple" />
					<p class="help-block">Choose muliple files (Maximum 3 images)</p>
				</div>
			</div>
			<!-- /row -->
			<div class="form-actions">
				<button type="submit" class="btn btn-primary">Submit</button>
				<button class="btn">Cancel</button>
			</div>
			<!-- /row -->
	</fieldset>
</div>
</div>
<!-- right nav -->
</div>
<?php  
include_once(__ROOT__.'../../includes/footer.php');  
?>